﻿/**
 *
 * @file FITKNastranBDFReader.h
 * @brief Nastran bdf读取
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-10-11
 *
 */
#ifndef _FITK_NASTRANBDF_READER__H___
#define _FITK_NASTRANBDF_READER__H___

#include "FITK_Interface/FITKInterfaceIO/FITKAbstractTextReader.h"
#include "FITK_Component/FITKAbaqusData/FITKAbaqusPart.h"
#include <QQueue>
#include <QMap>
#include <QStringList>

namespace AbaqusData
{
    class FITKDataCase;
}

namespace Nastran
{
    class FITKNastranBDFIOInterface;
    /**
     * @brief Nastran BDF读取类
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-10-11
     */
    class FITKNastranBDFReader : public Interface::FITKAbstractTextReader
    {
    public:
        /**
         * @brief Construct a new FITKNastranBDFReader object
         * @param[i]  interface      组件指针，可传递参数
         * @param[o]  isSuccess      是否执行成功
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-11
         */
        explicit FITKNastranBDFReader(FITKNastranBDFIOInterface* compInterface, bool & success);
        /**
        * @brief Destroy the FITKVAOneXMLReader object
        * @author LiBaojun (libaojunqd@foxmail.com)
        * @date 2024-10-11
        */
        virtual ~FITKNastranBDFReader() = default;
        /**
        * @brief 执行读取操作
        * @author LiBaojun (libaojunqd@foxmail.com)
        * @date 2024-10-11
        */
        virtual void run() override;

        /**
          * @brief 打印控制台消息
          * @param[i] level 打印级别 1 normal 2 warning 3error
          * @param[i] str 打印的信息
          * @author LiBaojun (libaojunqd@foxmail.com)
          * @date 2024-03-08
          */
        void consoleMessage(int level, const QString& str) override;

    private:
        /**
         * @brief 组件对象指针
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-11
         */
        FITKNastranBDFIOInterface* _compInterface{};
        /**
         * @brief 是否执行成功
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-11
         */
        bool &_isSuccess;
        /**
         * @brief 算例数据，读取的信息存放到这里
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-11
         */
        AbaqusData::FITKDataCase* _caseData{};
    };
}


#endif
